|
|
 |
|
|
|
|
' Draw the transformed object on a PictureBox. Public Sub Draw(ByVal pic As PictureBox, _
Optional R As Variant)
Dim pline As Polyline3d
' Draw the grid if it exists. If Not Polylines Is Nothing Then
For Each pline In Polylines
pline.Draw pic, R
Next pline
End If
' Uninteresting code that draws the
' control points and grid omitted.
End Sub |
|
|
|
|
|
|
|
|
Example program Bezier, shown in Figure 14.23, demonstrates the Bezier3d class. Use the option buttons to select the surface you want to see. Use the arrow keys to change the viewing direction. Click the check boxes to make the program display the control points or the control grid. |
|
|
|
|
|
|
|
|
By adding enough control points, you can create a Bezier surface that approximates almost any shape you want. However, each control point contributes to the value of every point on the surface. This arrangement has two consequences. First, as you add more control |
|
|
|
|
|
|
|
|
Figure 14.23
Program Bezier displaying a Bezier surface. |
|
|
|
|
|